package com.accp.www.chat;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class ChatHouse {
	
	Map<String, ChatRoom> rooms=new HashMap<String, ChatRoom>();

	public int size() {
		return rooms.size();
	}

	public ChatRoom get(String name) {
		return rooms.get(name);
	}

	public Set<String> getRoomsName() {
		return rooms.keySet();
	}

	public void createRoom(String roomName) {
		ChatRoom room=new ChatRoom(roomName);
		rooms.put(room.getName(), room);
	}
}
